package com.chance.cc.crawler.prod.command.trigger.domain.commerce.dangdang;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.commerce.dangdang.realtime.DangdangArticleCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.dangdang.realtime.DangdangArticleUrlCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.dangdang.realtime.DangdangCommentCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @ClassName dangdang
 * @Description TODO
 * @Author songding
 * @Date 2021/10/19 16:34
 * @Version 1.0
 **/
public class DangdangCommonCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {
    public static void main(String[] args) {
        //当当网评论
        publishVipCommentScheduleTriggerInfo();
        //当当网文章
      //  publishDangdangArticleScheduleTriggerInfo();
        //当当网文章每月采集一次全品链接
      //  publishDangdangArticleUrlScheduleTriggerInfo();
    }
    public static void publishVipCommentScheduleTriggerInfo(){
        CrawlerJob crawlerJob = DangdangCommentCrawlerScheduleJob.dangdangCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                DangdangCommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                //CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "0 10 2 * * ?",
                //"",
                "当当网评论每天凌晨2：10点采集一次");
    }
    public static void publishDangdangArticleScheduleTriggerInfo(){
        CrawlerJob crawlerJob = DangdangArticleCrawlerScheduleJob.dangdangCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                DangdangArticleCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                //CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "0 50 2 * * ?",
                //"",
                "当当网文章每天凌晨2：50点采集一次");
    }
    public static void publishDangdangArticleUrlScheduleTriggerInfo(){
        CrawlerJob crawlerJob = DangdangArticleUrlCrawlerScheduleJob.dangdangCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                DangdangArticleUrlCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                //CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "0 0 2 28 * ?",
                //"",
                "当当网文章每月采集一次全品链接");
    }

}
